package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.RecruitMapper;
import com.jobpass.common.model.Recruit;
import com.jobpass.common.service.RecruitService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class RecruitServiceImpl extends ServiceImpl<RecruitMapper, Recruit> implements RecruitService {

    @Resource
    private RecruitMapper recruitMapper;

    @Override
    public List<Recruit> getRecruitBy(String site, BigDecimal pay, String post, String creatTime) {
        return recruitMapper.getRecruitBy(site,pay,post,creatTime);
    }

    @Override
    public List<Recruit> FindAllRecruit() {
        return recruitMapper.selectList(null);
    }

    @Override
    public Recruit FindRecruitById(Long id) {
        return recruitMapper.selectById(id);
    }

    @Override
    public int DeleteRecruitById(Long id) {
        return recruitMapper.deleteById(id);
    }

    @Override
    public int UpdateRecruitById(Recruit recruit) {
        return recruitMapper.updateById(recruit);
    }

    @Override
    public int SavaRecruit(Recruit recruit) {
        return recruitMapper.insert(recruit);
    }
}
